<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-fire-add">
        <div class="form-group">
            <label class="col-sm-3 control-label">编号：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="fid" id="fid">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label ">设备状态(0-关，1-开)：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="dstatus" id="dstatus"/>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">环境温度：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="temperature" id="temperature">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">二氧化碳浓度：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="ppm" id="ppm">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">pm2.5浓度：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="pm" id="pm">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">电流检测：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="eletric" id="eletric">
            </div>
        </div>
    </form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
    var prefix = ctx + "iot/fire";

    $("#form-fire-add").validate({
        rules:{
            xxxx:{
                required:true,
            },
        }
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/add", $('#form-fire-add').serialize());
        }
    }
</script>
</body>
</html>
